<div class="modal fade" id="add_user_dialog" tabindex="-1" role="dialog" >
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title">添加管理帐号</h4>
            </div>
            <form class="form-horizontal" role="form" action="/user/" method="POST">
                <div class="modal-body">
                    <div class="form-group">
                        <label for="form_user_email" class="col-sm-3 control-label">输入用户邮箱</label>
                        <div class="col-sm-8">
                            <input id="form_user_email" name="user_email" class="form-control" type="email" />
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="form_user_name" class="col-sm-3 control-label">输入用户昵称</label>
                        <div class="col-sm-8">
                            <input id="form_user_name" name="user_name" class="form-control"  />
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="form_user_type" class="col-sm-3 control-label">选择用户类型</label>
                        <div class="col-sm-8">
                            <select id="form_user_type" class="form-control" name="user_type">
                                <option value="0">请选择</option>
                                <option value="10">mso管理</option>
                                <option value="12">mso用户</option>
                                <option value="11">盒子用户</option>
                            </select>
                        </div>
                    </div>

                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                    <button type="submit" class="btn btn-primary">添加</button>
                </div>
            </form>
        </div>
        <!-- /.modal-content -->
    </div>
    <!-- /.modal-dialog -->
</div><!-- /.modal -->



<div class="modal fade" id="add_app_dialog" tabindex="-1" role="dialog" >
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title">添加应用</h4>
            </div>
            <form class="form-horizontal" role="form" action="/app/" method="POST">
                <div class="modal-body">
                    <div class="form-group">
                        <label for="form_user_email" class="col-sm-3 control-label">输入应用名称</label>
                        <div class="col-sm-8">
                            <input id="form_app_name" name="app_name" class="form-control" type="text" />
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="form_app_visitor" class="col-sm-3 control-label">选择所属用户</label>
                        <div class="col-sm-8">
                            <select class="form-control" name="visitor" id="form_app_visitor">
                                <option value="">请选择(非必须)</option>
                                {% for u in users %}
                                <option value="{{ u.id }}">{{ u.username }}</option>
                                {% endfor %}
                            </select>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                    <button type="submit" class="btn btn-primary">添加</button>
                </div>
            </form>
        </div>
        <!-- /.modal-content -->
    </div>
    <!-- /.modal-dialog -->
</div><!-- /.modal -->

<div class="modal fade" id="add_active_dialog" tabindex="-1" role="dialog" >
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title">添加记录</h4>
            </div>
            <form class="form-horizontal" role="form" action="/appactive/{{ app_id }}" method="POST">
                <div class="modal-body">
                    <div class="form-group">
                        <label for="form_active_time" class="col-sm-3 control-label">日期</label>
                        <div class="col-sm-8">
                            <input id="form_active_time" name="time" class="form-control" type="date" />
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="form_active_amount" class="col-sm-3 control-label">激活数量</label>
                        <div class="col-sm-8">
                            <input id="form_active_amount" name="amount" class="form-control" type="text" />
                        </div>
                    </div>

                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                    <button type="submit" class="btn btn-primary">添加</button>
                </div>
            </form>
        </div>
        <!-- /.modal-content -->
    </div>
    <!-- /.modal-dialog -->
</div><!-- /.modal -->




<div class="modal fade" id="add_box_dialog" tabindex="-1" role="dialog" >
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title">添加盒子</h4>
            </div>
            <form class="form-horizontal" role="form" action="/box/" method="POST">
                <div class="modal-body">
                    <div class="form-group">
                        <label for="form_active_time" class="col-sm-3 control-label">日期</label>
                        <div class="col-sm-8">
                            <input id="form_active_time" name="time" class="form-control" type="date" />
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="form_active_amount" class="col-sm-3 control-label">激活数量</label>
                        <div class="col-sm-8">
                            <input id="form_active_amount" name="amount" class="form-control" type="text" />
                        </div>
                    </div>

                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                    <button type="submit" class="btn btn-primary">添加</button>
                </div>
            </form>
        </div>
        <!-- /.modal-content -->
    </div>
    <!-- /.modal-dialog -->
</div><!-- /.modal -->





